Learn R Programming

ehaGoF (version 0.1.1)

Goodness of fit - Relative Root Mean Square Error: Relative Root Mean Square Error

Description

Calculates and returns relative root mean square error (RRMSE) of the model. The ratio of the mean of square root of residuals squared to the mean of observed values.

Usage

gofRRMSE(Obs, Prd, dgt = 3)

Arguments

Obs

Observed values or target vector.

Prd

Predicted values. Values produced by approximation or regression.

dgt

Number of digits in decimal places. Default is 3.

Value

RelativeRootMeanSquareError

Relative root mean square error (RRMSE) of given set.

Details

RRMSE is calculated by dividing RMSE by the mean of observed values.

References

Comparison of the Predictive Capabilities of Several Data Mining Algorithms and Multiple Linear Regression in the Prediction of Body Weight by Means of Body Measurements in the Indigenous Beetal Goat of Pakistan, Ecevit Eyduran, Daniel Zaborski, Abdul Waheed, Senol Celik, Koksal Karadas and Wilhelm Grzesiak, Pakistan J. Zool., vol. 49(1), pp 257-265, 2017.

Indirect Estimation of Structural Parameters in South African Forests Using MISR-HR and LiDAR Remote Sensing Data - Precious Nokuthula Wistebaar Mahlangu, Renaud Mathieu, Konrad Wessels, Laven Naidoo, Michel M Verstraete, Gregory P Asner, Russell Main

Examples

Run this code
# NOT RUN {
# Input values, independent variable
input <- 0:4

# Target vector, observed values, dependent variable
target <- c(1.9, 4.1, 5.89, 7.9, 10.01)

# Simple linear regression, target across input like: target = a * input + b,
# where a and b are coefficients.
model <- lm(target~input)

# Information about the model
summary(model)

# Values predicted by the model
predicted <- predict(model)

# using library ehaGoF for goodness of fit
library(ehaGoF)

# Goodness of fit - relative root mean square error (RRMSE)
gofRRMSE(target, predicted)
# }

Run the code above in your browser using DataLab